home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWGConst.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  9.4 KB  |  337 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWGConst.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWGCONST_H
  11. #define FWGCONST_H
  12.  
  13. // ----- OpenDoc Includes -----
  14.  
  15. #ifndef _ODTYPES_
  16. #include <ODTypes.h>
  17. #endif
  18.  
  19. // ----- Macintosh Includes -----
  20.  
  21. #if defined(FW_BUILD_MAC) && !defined(__QUICKDRAW__)
  22. #include <QuickDraw.h>
  23. #endif
  24.  
  25. // ----- Windows Includes -----
  26.  
  27. #if defined(FW_BUILD_WIN) && !defined(_INC_WINDOWS)
  28. #include <windows.h>
  29. #endif
  30.  
  31. // ----- ODF Includes -----
  32.  
  33. #ifndef FWPAT_H
  34. #include "FWPat.h"
  35. #endif
  36.  
  37. #if FW_LIB_EXPORT_PRAGMAS
  38. #pragma lib_export on
  39. #endif
  40.  
  41. //========================================================================================
  42. //    Forward Declarations
  43. //========================================================================================
  44.  
  45. class FW_CLASS_ATTR FW_CColor;
  46. class FW_CLASS_ATTR FW_CString32;
  47. class FW_CLASS_ATTR FW_CPoint;
  48. class FW_CLASS_ATTR FW_CRect;
  49.  
  50. //========================================================================================
  51. //    Graphic System
  52. //========================================================================================
  53.  
  54. #ifdef FW_BUILD_MAC
  55. const ODGraphicsSystem FW_kGraphicSystem = kODQuickDraw;
  56. #endif
  57.  
  58. #ifdef FW_BUILD_WIN
  59. const ODGraphicsSystem FW_kGraphicSystem = kODWindows;
  60. #endif
  61.  
  62. //========================================================================================
  63. //    Patterns
  64. //========================================================================================
  65.  
  66. const short FW_kNbStandardPatterns = 12;
  67.  
  68. //========================================================================================
  69. //    Styles
  70. //========================================================================================
  71.  
  72. enum FW_EStandardStyles
  73. {
  74.     FW_kNormalStyle,
  75.     FW_kDashStyle,
  76.     FW_kDotStyle,
  77.     FW_kDashDotStyle,
  78.     FW_kDashDotDotStyle
  79. };
  80.  
  81. //========================================================================================
  82. //    Inks
  83. //========================================================================================
  84.  
  85. enum FW_EStandardInks
  86. {
  87.     FW_kNormalInk,
  88.     FW_kNormalTextInk,
  89.     FW_kInvertInk,
  90.     FW_kWhiteEraseInk
  91. };
  92.  
  93. //========================================================================================
  94. //    Fonts
  95. //========================================================================================
  96.  
  97. enum FW_EStandardFonts
  98. {
  99.     FW_kNormalFont
  100. };
  101.  
  102. //========================================================================================
  103. //    Transfer Modes
  104. //========================================================================================
  105. //    See FW_gTransferModes in FW_GrGlob.cpp
  106.  
  107. typedef unsigned long FW_TransferModes;
  108.  
  109. const FW_TransferModes FW_kCopy                = 0xFFFF0000L;
  110. const FW_TransferModes FW_kNotCopy            = 0xFFFF0001L;
  111. const FW_TransferModes FW_kOr                = 0xFFFF0002L;
  112. const FW_TransferModes FW_kNotOr            = 0xFFFF0003L;
  113. const FW_TransferModes FW_kXOr                = 0xFFFF0004L;
  114. const FW_TransferModes FW_kNotXOr            = 0xFFFF0005L;
  115. const FW_TransferModes FW_kClear            = 0xFFFF0006L;
  116. const FW_TransferModes FW_kNotClear            = 0xFFFF0007L;
  117. const FW_TransferModes FW_kHilite            = 0xFFFF0008L;
  118.  
  119. const FW_TransferModes FW_kErase            = 0xFFFF0009L;        // 'Special' Transfer Mode
  120. const FW_TransferModes FW_kInvert            = 0xFFFF000AL;        // 'Special' Transfer Mode
  121.  
  122. const FW_TransferModes FW_LastTransferMode    = FW_kInvert;
  123.  
  124. //========================================================================================
  125. //    Style dash kinds
  126. //========================================================================================
  127.  
  128. enum FW_EStyleDash
  129. {
  130.     FW_kSolidLine,
  131.  
  132.     FW_kDash,
  133.     FW_kDot,
  134.     FW_kDashDot,
  135.     FW_kDashDotDot,
  136.     
  137.     FW_kOpaque                 = 0x100,
  138.     
  139.     FW_kDashOpaque            = FW_kDash            + FW_kOpaque,
  140.     FW_kDotOpaque            = FW_kDot            + FW_kOpaque,
  141.     FW_kDashDotOpaque        = FW_kDashDot        + FW_kOpaque,
  142.     FW_kDashDotDotOpaque    = FW_kDashDotDot    + FW_kOpaque
  143. };
  144.  
  145. //========================================================================================
  146. //    Font Style
  147. //========================================================================================
  148.  
  149. typedef unsigned short FW_FontStyle;
  150.  
  151. enum FW_EFontStyles
  152. {
  153.     FW_kPlain             = 0x0000,
  154.     FW_kBold             = 0x0001,
  155.     FW_kItalic             = 0x0002,
  156.     FW_kUnderline         = 0x0004,
  157.     FW_kOutline         = 0x0008,
  158.     FW_kShadow             = 0x0010,
  159.     FW_kCondensed         = 0x0020,
  160.     FW_kExtended         = 0x0040,
  161.     FW_kStrikeOut         = 0x0080
  162. };
  163.  
  164. //========================================================================================
  165. //    Shape Types
  166. //========================================================================================
  167.  
  168. #ifdef FW_BUILD_MAC
  169. enum FW_EShapeCategories
  170. {
  171.     FW_kLineShape,            // Line
  172.     FW_kGeometricShape,        // Rect, Oval, Arc, RoundRect, Region
  173.     FW_kTypographicShape,    // Text
  174.     FW_kImageShape            // Bitmap, Picture
  175. };
  176. #endif
  177.  
  178. #ifdef FW_BUILD_WIN
  179. enum FW_EShapeCategories
  180. {
  181.     FW_kGeometricShapeWithInvert,    // Rect, Region
  182.     FW_kGeometricShape,                // Line, RoundRect, Oval, Arc
  183.     FW_kTypographicShape,            // Text
  184.     FW_kImageShape                    // Bitmap, Picture
  185. };
  186. #endif
  187.  
  188. //========================================================================================
  189. //    Rendering Verbs
  190. //========================================================================================
  191.  
  192. enum FW_ERenderVerbs
  193. {
  194.     FW_kNoRendering,
  195.     FW_kFrame,
  196.     FW_kFill
  197. };
  198.  
  199. //========================================================================================
  200. //    Globals
  201. //========================================================================================
  202.  
  203. // ----- Standard colors -----
  204. extern const FW_CColor            FW_kRGBBlack;
  205. extern const FW_CColor            FW_kRGBWhite;
  206. extern const FW_CColor            FW_kRGBRed;
  207. extern const FW_CColor            FW_kRGBYellow;
  208. extern const FW_CColor            FW_kRGBBlue;
  209. extern const FW_CColor            FW_kRGBGreen;
  210. extern const FW_CColor            FW_kRGBBrown;
  211. extern const FW_CColor            FW_kRGBPurple;
  212. extern const FW_CColor            FW_kRGBLightBlue;
  213. extern const FW_CColor            FW_kRGBGray;
  214. extern const FW_CColor            FW_kRGBLightGray;
  215. extern const FW_CColor            FW_kRGBDarkGray;
  216.  
  217. // ----- Standard Patterns -----
  218. extern const FW_BitPattern        FW_kBlackPat;
  219. extern const FW_BitPattern        FW_kWhitePat;
  220. extern const FW_BitPattern        FW_kGrayPat;
  221. extern const FW_BitPattern        FW_kLightGrayPat;
  222. extern const FW_BitPattern        FW_kDarkGrayPat;
  223. extern const FW_BitPattern        FW_kHorizontalPat;
  224. extern const FW_BitPattern        FW_kVerticalPat;
  225. extern const FW_BitPattern        FW_kFDiagonalPat;
  226. extern const FW_BitPattern        FW_kBDiagonalPat;
  227. extern const FW_BitPattern        FW_kCrossPat;
  228. extern const FW_BitPattern        FW_kDiagCrossPat;
  229. extern const FW_BitPattern        FW_kAntPat;
  230.  
  231. // ------ Standard font names -----
  232. extern const FW_CString32        FW_kSystemFont;
  233. extern const FW_CString32        FW_kDefaultFont;
  234. extern const FW_CString32        FW_kHelvetica;
  235. extern const FW_CString32        FW_kTimes;
  236. extern const FW_CString32        FW_kCourier;
  237. extern const FW_CString32        FW_kPalatino;
  238.  
  239. //========================================================================================
  240. //    Single-line Text Alignment Options
  241. //========================================================================================
  242.  
  243. typedef unsigned short FW_TextAlignment;
  244.  
  245. enum
  246. {
  247.     // Horizontal alignment
  248.     FW_kTextAlignLeft                        =    0,        // default
  249.     FW_kTextAlignRight                        =    0x0001,
  250.     FW_kTextAlignHCenter                    =    0x0002,
  251.     
  252.     FW_kTextAlignPrivHorzAlignMask            =    0x000F,
  253.  
  254.     // Vertical alignment
  255.     FW_kTextAlignTop                        =    0,        // default
  256.     FW_kTextAlignBottom                        =    0x0010,
  257.     FW_kTextAlignBaseLine                    =    0x0020,
  258.     FW_kTextAlignVCenter                    =    0x0040,
  259.     
  260.     FW_kTextAlignPrivVertAlignMask            =    0x00F0,
  261.     
  262.     // Position to use
  263.     FW_kTextAlignUseSpecifiedPos            =     0,        // default
  264.     FW_kTextAlignUseCurrentPos                =    0x0100,
  265.     
  266.     FW_kTextAlignPrivUsePosMask                =    0x0F00
  267. };
  268.  
  269. //========================================================================================
  270. //    Text Box Alignment Options
  271. //========================================================================================
  272.  
  273. typedef unsigned short FW_TextBoxOptions;
  274.  
  275. enum
  276. {
  277.     // Horizontal justification
  278.     FW_kTextBoxJustifyLeft                    = 0,        // default
  279.     FW_kTextBoxJustifyRight                    = 0x0001,
  280.     FW_kTextBoxJustifyHCenter                = 0x0002,
  281.     
  282.     FW_kTextBoxPrivHorzJusificationMask        = 0x000F,
  283.     
  284.     // Vertical jusitification
  285.     FW_kTextBoxJustifyTop                    = 0,        // default
  286.     FW_kTextBoxJustifyBottom                = 0x0010,
  287.     FW_kTextBoxJustifyVCenter                = 0x0020,
  288.  
  289.     FW_kTextBoxPrivVertJusificationMask        = 0x00F0,
  290.     
  291.     // Should the text be clipped to the box?  If not, make sure the box is large enough
  292.     FW_kTextBoxNoClipToBox                    = 0,
  293.     FW_kTextBoxClipToBox                    = 0x0100,    // default
  294.  
  295.     // The options below apply only if the following flag is not set
  296.     FW_kTextBoxSingleLine                    = 0x0200,
  297.     
  298.     // Word wrapping and breaking options
  299.     FW_kTextBoxWordWrap                        = 0x0400,
  300.     FW_kTextBoxWordBreak                    = 0x0800
  301. };
  302.  
  303.  
  304. //========================================================================================
  305. // Icon drawing
  306. //========================================================================================
  307.  
  308. typedef unsigned short FW_RenderIconOptions;
  309.  
  310. enum
  311. {
  312.     // Horizontal alignment
  313.  
  314.     FW_kIconAlignLeft                        =    0,        // default
  315.     FW_kIconAlignCenter                        =    0x0001,
  316.     FW_kIconAlignRight                        =    0x0002,
  317.     
  318.     FW_kIconPrivHorzMask                    =    0x000F,
  319.     
  320.     // Vertical alignment
  321.     
  322.     FW_kIconAlignTop                        =    0,
  323.     FW_kIconAlignVCenter                    =    0x0010,
  324.     FW_kIconAlignBottom                        =    0x0020,
  325.     
  326.     FW_kIconPrivVertMask                    =    0x00F0,
  327.     
  328.     // Scale the icon to the rectangle
  329.     FW_kIconScaleToFit                        =    0x0100
  330. };
  331.  
  332. #if FW_LIB_EXPORT_PRAGMAS
  333. #pragma lib_export off
  334. #endif
  335.  
  336. #endif
  337.